<?php
namespace app\index\model;

use think\Model;

class Account extends Model
{
    //账户资金表
    protected $table = 'sn_account';

    public function user()
    {
        return $this->belongsTo('User', 'uid', 'id');
    }

    /** 账户资金表
     * @param $map
     * @return \think\Paginator
     * @throws \think\exception\DbException
     */
    public function query_list($map)
    {
        return $this->relation(array('user'))->where($map)->paginate();
    }
}